home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / rbsetnv1.zip / SETENV.DOC < prev    next >
Text File  |  1991-01-03  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.      SETENV(1)           MS-DOS auxiliary utilities           SETENV(1)
  5.  
  6.  
  7.  
  8.      NAME
  9.           setenv - set environment variables, with command and
  10.           variable substitution
  11.  
  12.      SYNOPSIS
  13.           setenv variable [argument ... ]
  14.  
  15.      DESCRIPTION
  16.           setenv is a utility to set DOS environment variables,
  17.           performing wildcard expansion, command substitution and
  18.           variable substitution on the arguments before assigning to
  19.           the variable.  The command line is iteratively scanned for
  20.           command substitutions in backquotes (`...`) and environment
  21.           variables (%var), and the resulting text used as the value
  22.           of the environment variable named in the first argument.
  23.           Command substitutions are usually performed by calling
  24.           loading a shell to run the command. If the first character
  25.           of the command is '@', the command is exec'ed directly
  26.           (faster than loading a shell, but only works with exe and
  27.           com files).  The magic characters '%','`', and '@' are set
  28.           by #defines in comsub.h so you can change them if you don't
  29.           like them.
  30.  
  31.           When substituting the output of commands, newlines are
  32.           replaced by spaces. Arguments may need to be quoted in order
  33.           that setenv will see the "%" or "`...`" characters,
  34.           depending on which shell you use.  The 4DOS shell in
  35.           particular needs to have backquotes protected by double
  36.           quotes. Since variable expansion is performed internally,
  37.           environment variables may be set to values longer than the
  38.           127 character limit enforced by the MSDOS command line
  39.           length.
  40.  
  41.      DIAGNOSTICS
  42.           Diagnostics are printed for the following errors:
  43.           - unable to locate environment
  44.           - environment overflow
  45.           - out of memory
  46.           - command substitution failed (command not found, or line too long)
  47.  
  48.      EXAMPLES
  49.           setenv cwd `cd`
  50.  
  51.      SEE ALSO
  52.           eval, incr, decr, expr
  53.  
  54.      BUGS
  55.           Tested with 4dos and command shells.  With ms_sh bourne
  56.           shell, this program modifies what DOS thinks is the
  57.           environment of the shell, but this does not seem to be what
  58.           is passed on to child processes.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                            (printed 0/3/91)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SETENV(1)           MS-DOS auxiliary utilities           SETENV(1)
  71.  
  72.  
  73.           Command.com (at least version 4.01) has trouble displaying
  74.           long environment variables with the SET command, even though
  75.           they are in fact correctly created by setenv.
  76.  
  77.      AUTHOR
  78.           Richard Brittain (richard@calvin.ee.cornell.edu)
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.